/*********************************************************
*
*  Project:      Utilities
*
*  Class:        UnicodeStrings
*
*  File name:    UnicodeStrings.java
*
*
*    SVN:
*
*    $Rev$:
*    $Date$:
*
*    $LastChangedBy$:
*
*    $HeadURL$:
*
**********************************************************/

package com.eastmountain.chinese.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

import com.eastmountain.util.DisplayFormats;

public class UnicodeStrings {

    /*************************************************
     *
     *   main
     *
     ************************************************/

    public static void main( String[] args ) throws IOException {

        FileInputStream in = null;
        //FileOutputStream out = null;

        int k = 0;

        try {

            //in = new FileInputStream( "justRadicals.html" );
            //out = new FileOutputStream( "outagain.txt" );

            FileInputStream fis = new FileInputStream( "justRadicals.html" );
            InputStreamReader isr = new InputStreamReader( fis, "UTF-8" );

            int c;

            while ( (c = isr.read()) != -1 ) {

                k++;

                String unicode = DisplayFormats.charToUnicodeString( c );

                System.out.println( k + " - " + unicode );

            }

        } finally {

            if ( in != null ) {
                in.close();
            }
            //if ( out != null ) {
            //    out.close();
            //}

        }

    }

}
